
import { getLocation, getQuery } from '../utils/path'

// 获取基础数据
export default ({
	action = 'view',
	target = '页面',
	page = document.title || getLocation().href,
	parentPage = '',
	pageParams = getQuery(),
	parentParams = {},
	actionParams = {},
	...params
} = {}) => {
	return {
		action,
		target,
		page,
		parentPage,
		pageParams,
		parentParams,
		actionParams,
		...params,
	}
}